Personal tools

Lua/Client/Vehicle/Functions/GetOccupants

From JC2-MP Documentation

< Lua‎ | Client‎ | Vehicle
Jump to: navigation, search

Returns    table
Prototype    Vehicle:GetOccupants()
Description    Returns a table of Players that are inside of the vehicle.


Partial example

local occupants = vehicle:GetOccupants()
for index, player in ipairs(occupants) do
	print(player)
end